Skip to content

Update contributing docs for sass modules#7055

Open
domoscargin wants to merge 4 commits into
mainfrom
bk-replace-import-with-use-contributing
Open

Update contributing docs for sass modules#7055
domoscargin wants to merge 4 commits into
mainfrom
bk-replace-import-with-use-contributing

Conversation

@domoscargin
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

📋 Stats

No changes to any distributed file sizes!


Action run for af97b95

@domoscargin domoscargin force-pushed the bk-replace-import-with-use-contributing branch from c3c3dff to 587b683 Compare May 14, 2026 10:41
@domoscargin domoscargin force-pushed the bk-replace-import-with-use-contributing branch from 587b683 to 3ee08a6 Compare May 14, 2026 10:48
Copy link
Copy Markdown
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edits look neat! I'm wondering if we should also touch on specificities from supporting @use that we discovered in the css.md file:

  • govuk-exports only being necessary in import-only files or mixins that want to prevent double output
  • how if you need to get a reference to a function, you need to receive the output of meta.get-function and can no longer use a string like we used to
  • placeholders requiring a little care in the order files include each other, and need unit testing

Copy link
Copy Markdown
Contributor

@seaemsi seaemsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have made a few suggestions for clarity

Comment thread docs/contributing/coding-standards/components.md Outdated
Comment thread docs/contributing/coding-standards/components.md Outdated
Comment thread docs/contributing/coding-standards/components.md Outdated
@domoscargin domoscargin linked an issue May 20, 2026 that may be closed by this pull request
1 task
@domoscargin domoscargin force-pushed the bk-replace-import-with-use-contributing branch from 3ee08a6 to 21b1ada Compare May 20, 2026 13:24
@github-actions
Copy link
Copy Markdown

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/tools/_exports.scss b/packages/govuk-frontend/dist/govuk/tools/_exports.scss
index a04b9ce78..6441adbfc 100644
--- a/packages/govuk-frontend/dist/govuk/tools/_exports.scss
+++ b/packages/govuk-frontend/dist/govuk/tools/_exports.scss
@@ -24,7 +24,7 @@ $govuk-imported-modules: () !default;
 ///
 /// @param {String} $name - Name of module - must be unique within the codebase
 /// @content The passed content will only be outputted if a module of the same
-///   $name has not already been outputted
+///   $name has not already been outputted. Use only with `@import`, not `@use`.
 /// @access public
 
 @mixin govuk-exports($name) {

Action run for af97b95

@domoscargin
Copy link
Copy Markdown
Contributor Author

* `govuk-exports` only being necessary in import-only files or mixins that want to prevent double output

I've added a note to the govuk-exports function docs.

* how if you need to get a reference to a function, you need to receive the output of `meta.get-function` and can no longer use a `string` like we used to

Outside of our specific uses (the asset urls functions), could you do this before in Sass? This feels like less of a code-style preference and more of a necessity moving forward with Sass, so not really relevant for this file?

* placeholders requiring a little care in the order files include each other, and need unit testing

Placeholders are non-intuitive, but again feel like less of a style preference and more of "this is how Sass works".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review coding standards documentation for CSS

4 participants